<%--
  Created by IntelliJ IDEA.
  User: zhaocan
  Date: 2018/5/7
  Time: 11:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/pages/common/meta.jsp"%>
<!--近24小时工单处理概况开始-->
<div class="ys-module-wrap b40-box" >
    <div class="ys-module-title">
        <h2>近24小时服务工单处理概况</h2>
    </div>
    <div class="ys-module-con">
        <div id="orderDealChart" style="width:100%; height: 256px; text-align: center;"></div>
    </div>
</div>
<script type="text/javascript">
    function initorderDealChart(){
        uceAjax(G_CTX_PATH+"/cs/CsOrderStatistic/getNear24hOrderDealStatistics.do", {}, function(result){
            var statusArray =new Array();
            var dataArray =new Array();
            for(var i =0;i<result.length;i++){
                statusArray.push(result[i].STATUS_NAME);
                dataArray.push({value:result[i].NUM,name:result[i].STATUS_NAME});
            }
            var orderDealChart = echarts.init(document.getElementById('orderDealChart'));
            orderDealOption = {
                tooltip: {
                    trigger: 'item',
                    formatter: "{b} : {c} ({d}%)"
                },
                color:['#558b2f', '#18ffff','#ffc400','#dd2c00','#ef5350'],
                legend: {
                    // orient: 'vertical',
                    // top: 'middle',
                    bottom: 0,
                    left: 'center',
                    data: statusArray
                },
                series: [
                    {
                        type: 'pie',
                        radius: '60%',
                        center: ['50%', '40%'],
                        selectedMode: 'single',
                        data: dataArray,
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            orderDealChart.setOption(orderDealOption);
        },"GET");
    }
    initorderDealChart();
</script>
<!--近24小时工单处理概况结束-->
